package com.lc.YYGH.model.cmn;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lc.YYGH.model.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Data
@ApiModel(description = "数据字典")
@TableName("dict")
public class Dict extends BaseEntity {
    private static final long serialVersionUTD=1L;

    @ApiModelProperty(value="id")
    private Long id;

    @ApiModelProperty(value="创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value="更新时间")
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty(value="逻辑删除(1;已删除，0：未删除)")
    @TableLogic
    @TableField("is_deleted")
    private Integer isDeleted;

    @ApiModelProperty(value="其他参数")
    @TableField(exist=false)
    private Map<String,Object> param =new HashMap<>();

    @ApiModelProperty(value="上级id")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty(value="名称")
    @TableField("name")
    private String name;

    @ApiModelProperty(value="值")
    @TableField("value")
    private String value; //数据库的是bigint

    @ApiModelProperty(value="编码")
    @TableField("dict_code")
    private String dictCode;

    @ApiModelProperty(value="是否包含子节点")
    @TableField(exist = false)
    private boolean hasChildren;



}
